-- GENERATED SPELL FOR [Lethon] --


function spell0_14888(pUnit, Event) --@Draw Spirit,Self--
pUnit:FullCastSpellOnTarget(24811,pUnit)
pUnit:RegisterEvent('Sorts_14888', 5000, 1)
end

function spell1_14888(pUnit, Event) --@Noxious Breath,Self--
pUnit:FullCastSpellOnTarget(24818,pUnit)
pUnit:RegisterEvent('Sorts_14888', 30000, 1)
end

function spell2_14888(pUnit, Event) --@Seeping Fog,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24813,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14888', 1, 1)
end

function spell3_14888(pUnit, Event) --@Seeping Fog,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24814,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_14888', 1, 1)
end

function spell4_14888(pUnit, Event) --@Shadow Bolt Whirl,Self--
pUnit:FullCastSpellOnTarget(24834,pUnit)
pUnit:RegisterEvent('Sorts_14888', 0, 1)
end

function spell5_14888(pUnit, Event) --@Summon Player,n/a--
pUnit:FullCastSpellOnTarget(24776,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14888', 330, 1)
end

function spell6_14888(pUnit, Event) --@Tail Sweep,n/a--
pUnit:FullCastSpellOnTarget(15847,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14888', 524, 1)
end

function Sorts_14888(pUnit, Event)
local choix_sorts_14888 = math.random(0, 6)
if choix_sorts_14888 == 0 then
pUnit:RegisterEvent('spell0_14888', 1, 1)
end
if choix_sorts_14888 == 1 then
pUnit:RegisterEvent('spell1_14888', 1, 1)
end
if choix_sorts_14888 == 2 then
pUnit:RegisterEvent('spell2_14888', 1, 1)
end
if choix_sorts_14888 == 3 then
pUnit:RegisterEvent('spell3_14888', 1, 1)
end
if choix_sorts_14888 == 4 then
pUnit:RegisterEvent('spell4_14888', 1, 1)
end
if choix_sorts_14888 == 5 then
pUnit:RegisterEvent('spell5_14888', 1, 1)
end
if choix_sorts_14888 == 6 then
pUnit:RegisterEvent('spell6_14888', 1, 1)
end
end

function mob14888_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14888', math.random(1500, 3000), 1)
end

function mob14888_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14888_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14888_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14888, 1, 'mob14888_Action')
RegisterUnitEvent(14888, 2, 'mob14888_Leave')
RegisterUnitEvent(14888, 3, 'mob14888_Kill')
RegisterUnitEvent(14888, 4, 'mob14888_Die')
